﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="projectLeader.aspx.cs" Inherits="TimeIt.beispiele.WebForm1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Projektleiter</title>
    <link rel="stylesheet" type="text/css" href="../style/scripte/spacss.css" />
    <link rel="stylesheet" type="text/css" href="../style/scripte/menu1css.css" />
    <link rel="stylesheet" type="text/css" href="../style/scripte/content.css" />
    <link rel="shortcut icon" href="../style/pictures/logo/iconlogo.png" /> 
    <style type="text/css">
        #form1
        {
            text-align: left;
        }
        .style3
        {
            text-decoration: underline;
        }
        .style8
        {
            text-align: left;
        }
        .style9
        {
            width: 95px;
        }
        .style10
        {
            width: 100%;
        }
        .style13
        {
            width: 95px;
            text-align: left;
        }
        .style14
        {
            height: 30px;
            text-align: left;
            width: 193px;
        }
        .style15
        {
            height: 30px;
            text-align: left;
            width: 128px;
        }
        .style16
        {
            text-align: left;
            width: 171px;
        }
        .style18
        {
            text-align: left;
            width: 269px;
        }
        .style19
        {
            width: 269px;
        }
        .style20
        {
            text-align: left;
            width: 790px;
        }
        .style22
        {
            text-align: left;
            width: 128px;
        }
        .style23
        {
            width: 128px;
        }
        .style24
        {
            width: 90%;
        }
        .style25
        {
            width: 279px;
        }
        .style26
        {
            text-align: left;
            width: 193px;
        }
        .style27
        {
            width: 193px;
        }
    </style>
</head>
<body>
    <div id="backgroundbody">
        <div id="templatecontent">
            <div id="content_top">
                <div id="menu_o_bg">
                </div>
                <div id="menu_u_bg">
                </div>
                <div id="content_body">
                    <div id="content_bottom">
                    </div>
                </div>
            </div>
            <div id="content_border">
                <div id="menu_o">
                    <!-- Menu_1 Roll_over and drop_down -->
                    <ul id="Navigation">
                        <li><a href=""> </a></li>
                        <li><a href=""> </a></li>
                        <li><a href="login.aspx">Logout</a></li>
                        <li><a href="help.aspx">Help</a></li>
                        <li><a href="impressum.aspx">Impressum</a></li>
                    </ul>
                    <!-- Menu_1 Ende!! -->
                </div>
 
<!-- Contentbereich!! -->
           <div id="hellocontent">
                <p style="font-weight: 700; font-size: large">Welcome, 
                &nbsp;<asp:Label ID="UserName" runat="server" Text="User"></asp:Label>!</p>
           </div>
           <div id="editcontent">

                <form id="form1" runat="server">
                <div id="projectLeader"></div>
                <br />
                    <asp:Menu ID="projectMenu" runat="server" Orientation="Horizontal" 
                         onmenuitemclick="projectMenu_MenuItemClick" 
                    style="left:200px;height:40px;top:20px;width:600px;">
                        <Items>
                            <asp:MenuItem Text=" " Value="first" 
                                ImageUrl="~/style/pictures/navigation/Menu_btn/TimesheetControl_btn.png"></asp:MenuItem>
                            <asp:MenuItem Text=" " Value="second" 
                                ImageUrl="~/style/pictures/navigation/Menu_btn/employeeControl_btn.png"></asp:MenuItem>
                            <asp:MenuItem Text=" " Value="third" 
                                ImageUrl="~/style/pictures/navigation/Menu_btn/employeeTimes_btn.png"></asp:MenuItem>
                        </Items>
                        <StaticHoverStyle Font-Bold="True" Font-Underline="False" />
                        <StaticMenuItemStyle HorizontalPadding="10px" />
                        <StaticSelectedStyle HorizontalPadding="10px" />
                    </asp:Menu>
                    <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
                        <asp:View ID="TimesheetView" runat="server">
                        <asp:Label ID="checkMsg" runat="server"></asp:Label>
                        <p class="style3" style="text-align: left; width: 183px;">
                                            <strong>Enter new working time: </strong>
                                        </p>
                            <table width="100%">
                                            <tr>
                                                <td class="style13">
                                                    Project:</td>
                                                <td class="style18">
                                                    <asp:DropDownList ID="DropDownProject" runat="server" 
                                                        DataSourceID="odsActiveProjects" DataTextField="Name" DataValueField="ID" 
                                                        Height="25px" Width="172px">
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="style13">
                                                    Date:</td>
                                                <td style="text-align: left" class="style19">
                                                    <asp:Calendar ID="Calendar1" runat="server" BackColor="White" 
                                                        BorderColor="White" BorderWidth="1px" Font-Names="Verdana" Font-Size="9pt" 
                                                        ForeColor="Black" Height="86px" NextPrevFormat="FullMonth" 
                                                        OnSelectionChanged="Calendar1_SelectionChanged" 
                                                        Style="text-align: left; margin-left: 0px;" Width="307px">
                                                        <DayHeaderStyle Font-Bold="True" Font-Size="8pt" />
                                                        <NextPrevStyle Font-Bold="True" Font-Size="8pt" ForeColor="#333333" 
                                                            VerticalAlign="Bottom" />
                                                        <OtherMonthDayStyle ForeColor="#999999" />
                                                        <SelectedDayStyle BackColor="#333399" ForeColor="White" />
                                                        <TitleStyle BackColor="White" BorderColor="Black" BorderWidth="4px" 
                                                            Font-Bold="True" Font-Size="12pt" ForeColor="#333399" />
                                                        <TodayDayStyle BackColor="#CCCCCC" />
                                                    </asp:Calendar>
                                                    <asp:Label ID="txtDate" runat="server" Text="Selected date"></asp:Label>
                                                </td>
                                                <td style="text-align: left"> 
                                                    <asp:Label ID="dateError" runat="server" ForeColor="Red" 
                                                        style="text-align: left"></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="style13">Hours:</td>
                                                <td class="style18">
                                                    <asp:TextBox ID="txtHours" runat="server" Width="50px"></asp:TextBox>
                                                </td>
                                                <td style="text-align: left">
                                                    <asp:Label ID="txtHoursError" runat="server" ForeColor="Red" 
                                                        style="text-align: left"></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                            <td class="style13">Category:</td>
                                            <td style="text-align: left">
                                                <asp:DropDownList ID="DropDownCategory" runat="server" Height="21px" 
                                                    Width="160px">
                                                    <asp:ListItem>Consultation</asp:ListItem>
                                                    <asp:ListItem>Development</asp:ListItem>
                                                    <asp:ListItem>Meeting</asp:ListItem>
                                                    <asp:ListItem>Support</asp:ListItem>
                                                    <asp:ListItem>Other</asp:ListItem>
                                                </asp:DropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="style13">
                                                    Description:</td>
                                                <td class="style18">
                                                    
                                                    <asp:TextBox ID="txtDescription" runat="server" Width="152px"></asp:TextBox>
                                                    
                                                </td>
                                                <td style="text-align: left">
                                                    <asp:Label ID="txtDescriptionError" runat="server" ForeColor="Red" 
                                                        style="text-align: left"></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="style13">
                                                    Chargeable:</td>
                                                <td class="style18">
                                                    <asp:CheckBox ID="checkChargeable" runat="server" />
                                                </td>
                                                
                                            </tr>
                                            <tr>
                                                <td class="style9">
                                                    &nbsp;</td>
                                                <td style="text-align: right" class="style19">
                                                    <asp:Button ID="insertTime" runat="server" OnClick="btninsert_time" 
                                                        Text="Submit time..." Width="102px" />
                                                </td>
                                            </tr>
                                        </table>
                            
                            <table class="style10" >
                                <tr>
                                
                                    <td>
                                        <p class="style3" style="text-align: left">
                                            <strong>Own hours worked:</strong></p>
                                        <asp:GridView ID="grdTimeSheet" runat="server" AllowPaging="True" 
                                            AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC" 
                                            BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                                            DataSourceID="odsTimeSheet" ForeColor="Black" GridLines="Horizontal" 
                                            Height="120px" PageSize="5" Width="100%">
                                            <Columns>
                                                <asp:BoundField DataField="ProjectName" HeaderText="ProjectName" 
                                                    SortExpression="ProjectName" />
                                                <asp:BoundField DataField="Category" HeaderText="Category" 
                                                    SortExpression="Category" />
                                                <asp:BoundField DataField="Description" HeaderText="Description" 
                                                    SortExpression="Description" />
                                                <asp:BoundField DataField="Date" HeaderText="Date" SortExpression="Date" />
                                                <asp:BoundField DataField="Hours" HeaderText="Hours" SortExpression="Hours" />
                                            </Columns>
                                            <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                                            <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
                                            <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                                            <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
                                            <SortedAscendingCellStyle BackColor="#F7F7F7" />
                                            <SortedAscendingHeaderStyle BackColor="#4B4B4B" />
                                            <SortedDescendingCellStyle BackColor="#E5E5E5" />
                                            <SortedDescendingHeaderStyle BackColor="#242121" />
                                        </asp:GridView>
                                    </td>
                                
                                </tr>
                            </table>
                            
                            <br />
                        </asp:View>
                        <asp:View ID="EmployeeView" runat="server">
                        <br />
                        <asp:Label ID="checkPMsg" runat="server" ForeColor="Black"></asp:Label>
                            <div class="style8">
                                <strong style="text-align: left">Overview employee:</strong><br /><br />
                                <strong>
                                
                                <br /><asp:GridView ID="grd_employee" runat="server" AllowPaging="True" 
                                    AutoGenerateColumns="False" DataSourceID="ObjectDataSource1" Height="71px" 
                                    PageSize="5" Width="100%">
                                    <Columns>
                                        <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
                                        <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
                                        <asp:BoundField DataField="InternalHourlyRate" HeaderText="InternalHourlyRate" 
                                            SortExpression="InternalHourlyRate" />
                                        <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
                                        <asp:CommandField CancelText="cancle" DeleteText="delete" EditText="edit" 
                                            HeaderText="Edit" InsertText="add" NewText="new" SelectText="select" 
                                            ShowEditButton="True" UpdateText="update" />
                                    </Columns>
                                </asp:GridView>
                                </strong>
                                <br />
                                <strong style="text-align: left">Adding new employee:</strong><br /><br />
                                <table style="width:100%;">
                                    <tr>
                                        <td class="style15">
                                            Title:&nbsp;
                                        </td>
                                        <td class="style14">
                                            <asp:DropDownList ID="DropDownTitle" runat="server" Height="28px" Width="175px">
                                                <asp:ListItem>Ms.</asp:ListItem>
                                                <asp:ListItem>Mr.</asp:ListItem>
                                                <asp:ListItem>Dr.</asp:ListItem>
                                                <asp:ListItem>Prof. Dr.</asp:ListItem>
                                                <asp:ListItem>Dipl. Ing.</asp:ListItem>
                                                <asp:ListItem>Captain</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style22">
                                            Name:</td>
                                        <td class="style26">
                                            <asp:TextBox ID="txtUName" runat="server" Width="173px"></asp:TextBox>
                                        </td>
                                        <td style="text-align: left">
                                            <asp:Label ID="errorMsgName" runat="server" ForeColor="Red"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style23">
                                            Email:</td>
                                        <td class="style27">
                                            <asp:TextBox ID="txtUEmail" runat="server" Width="173px"></asp:TextBox>
                                        </td>
                                        <td>
                                            <asp:Label ID="errorMsgEmail" runat="server" ForeColor="Red"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style23">
                                            Hourly rate (int.):</td>
                                        <td class="style27">
                                            
                                            <asp:TextBox ID="txtUHourlyrate" runat="server" Width="173px"></asp:TextBox>
                                            
                                        </td>
                                        <td>
                                            <asp:Label ID="errorMsgHourlyRate" runat="server" ForeColor="Red"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style23">Login password:</td>
                                        <td class="style27">
                                            <asp:TextBox ID="txtUPw" runat="server" TextMode="Password" Width="173px"></asp:TextBox>
                                        </td>
                                        <td>
                                            <asp:Label ID="ErrorMsgPW" runat="server" ForeColor="Red"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                    <td class="style23"></td><td class="style27">
                                        
                                        <asp:Button ID="btninsert_employee" runat="server" 
                                            onclick="btninsert_employees" style="text-align: left" Text="Add employee..." 
                                            Width="175px" />
                                        
                                        </td><td></td>
                                    </tr>
                                    <tr>
                                        <td class="style16" colspan="3">
                                            &nbsp;</td>
                                    </tr>
                                </table>
                            </div>
                        </asp:View>
                        <asp:View ID="EmployeeTimeView" runat="server">
                        <div class="style20">
                            <br />
                            <strong>Timesheets of Employees:</strong>
                            
                            <br />
                            <asp:GridView ID="GridView1" runat="server" Width="773px" 
                                AutoGenerateColumns="False" DataSourceID="odsEmployeeTimeSheet" 
                                AllowPaging="True">
                                <Columns>
                                    <asp:BoundField DataField="UserName" HeaderText="UserName" 
                                        SortExpression="UserName" />
                                    <asp:BoundField DataField="ProjectName" HeaderText="ProjectName" 
                                        SortExpression="ProjectName" />
                                    <asp:BoundField DataField="Category" HeaderText="Category" 
                                        SortExpression="Category" />
                                    <asp:BoundField DataField="Description" HeaderText="Description" 
                                        SortExpression="Description" />
                                    <asp:BoundField DataField="Hours" HeaderText="Hours" SortExpression="Hours" />
                                    <asp:BoundField DataField="Date" HeaderText="Date" 
                                        SortExpression="Date" />
                                    <asp:CheckBoxField DataField="Chargeable" HeaderText="Chargeable" 
                                        SortExpression="Chargeable" />
                                </Columns>
                            </asp:GridView>
                        <br />
                        
                        </div>
                        </asp:View>
                    </asp:MultiView>

                
                <br />
                
                <asp:ObjectDataSource ID="odsTimeSheet" runat="server" SelectMethod="GetTimeSheetbySession"
                                    TypeName="bll.clsTimeSheetCollection" DataObjectTypeName="bll.clsUser" 
                                    UpdateMethod="UpdateUser"></asp:ObjectDataSource>

                <asp:ObjectDataSource ID="odsProjects" runat="server" SelectMethod="getActiveProjects"
                    TypeName="bll.clsProjectCollection"></asp:ObjectDataSource>

                <asp:ObjectDataSource 
                            ID="ObjectDataSource1" runat="server" DataObjectTypeName="bll.clsUser" 
                            DeleteMethod="DeleteUser" InsertMethod="InsertUser" SelectMethod="getAllUsers" 
                            TypeName="bll.clsUserCollection" UpdateMethod="UpdateUser">
                 </asp:ObjectDataSource>

                 <asp:ObjectDataSource ID="odsActiveProjects" runat="server" SelectMethod="getActiveProjects" 
                            TypeName="bll.clsProjectCollection">
                 </asp:ObjectDataSource>
            
                 <asp:ObjectDataSource ID="odsEmployeeTimeSheet" runat="server" SelectMethod="getAllTimeSheetOfEmployee" 
                            TypeName="bll.clsTimeSheetCollection">
                 </asp:ObjectDataSource>
                </form>
            </div>
<!-- Contentbereich Ende!! -->
                <div id="logo">
                </div>
            </div>
        </div>
    </div>
</body>
</html>
